<template>
	<view class="play">
		<view class="main1" v-for="(item,index) in play" :key="index" @click="toDetail(item.id)">
			<view class="left">
				<view class="title">{{item.title}}</view>
			    <view class="time">{{item.createtime}}</view>
			</view>
            <!-- <view class='right' ><image :src="item.image" mode="aspectFill" class="image"></image></view> -->
		</view>
	</view>
</template>

<script>
	export default {
	  data() {
	    return {
		   play:[],
			 type:''
	    };
	  },
		onLoad(option) {
			this.type = option.type
			console.log(this.type,111111111111111)
			// if(option.type==2){
			// 	uni.setNavigationBarTitle({
			// 		title:'新人帮助'
			// 	})
			// }
			// if(option.type == 'notice'){
			// 	uni.setNavigationBarTitle({
			// 	    title: '公告'
			// 	});
			// 	this.noticeList()
			// }
			// if(option.type == 'paly'){
			// 	uni.setNavigationBarTitle({
			// 	    title: '玩法介绍'
			// 	});
			// 	this.palyList()
			// }
			if(option.type == 2){
			    uni.setNavigationBarTitle({
			        title: '新人帮助'
			    });
			   }
			   if(option.type == 1){
			    uni.setNavigationBarTitle({
			        title: '玩法介绍'
			    });
			   }
			this.palyList()
			
		},
	  mounted() {
	
	  },
	  methods: {
			// noticeList(){
			// 	let that = this;
			// 	that.$http('common.notice', {
			// 	}).then(res => {
			// 		this.play = res.data.data
			// 		console.log(this.play,"zhou")
			// 	});
			// },
			palyList(){
				let that = this;
				that.$http('common.play', {
					type:this.type
				}).then(res => {
					this.play = res.data.cate
					console.log(this.play,"zhou")
				});
			},
		 toDetail(id) {
		 	this.$Router.push(`/pages/public/play/newDetail?id=${id}&type=${this.type}`)
		 }
	  }
	
	}
</script>

<style  lang="scss" scoped>
	.play{
		background: white;
		height: 100%;
	}
	.main1{
		background: white;
		overflow: hidden;
		border-bottom:1px solid #F3F3F3;
		margin: 18rpx;
		padding:25rpx 0;
		.left{
			padding-left:50rpx;
			// width: 400rpx;
			float: left;
			.title{
				font-size: 26rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #333333;
			}
			.time{
				font-size: 20rpx;
				font-family: PingFang SC;
				font-weight: 400;
				color: #999999;
				margin-top:75rpx;
			}
		}
	    .right{
			
			float: right;
			.image{
				width: 201rpx;
				height: 129rpx;
				border-radius: 10rpx;
			}
		}
	}
</style>
